/**
 * author wen
 * cunyu
 * email wjd_13@hotmail.com
 */
package com.cunyu.action;

import com.cunyu.bean.Form;
import com.cunyu.bean.ReqData;
import com.cunyu.bean.RespData;
import com.cunyu.service.FeedBackService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 反馈、申诉等
 * @author win
 * 2019/04/28-11:04
 */
@Controller
public class MessageController extends BaseController{

    @Resource
    FeedBackService feedBackService ;

    @RequestMapping("/feedback/complain")
    public String complain(Model model , ReqData reqData, Form form){
        RespData<List<Map<String, Object>>> listRespData = feedBackService.orderTypePage(reqData,form);
        model.addAttribute("respData",listRespData) ;
        model.addAttribute("form",form) ;
        return "feedback/complain" ;
    }

    @RequestMapping("/feedback/feed")
    public String feed(Model model , ReqData reqData){
        RespData<List<Map<String, Object>>> listRespData = feedBackService.typePage(reqData);
        model.addAttribute("respData",listRespData) ;
        return "feedback/feed" ;
    }

}
